target triple = "x86_64-unknown-linux-gnu"
%struct.CarElt = type {
    i32,
    %struct.tInitCar,
    %struct.tPublicCar,
    %struct.tCarRaceInfo,
    %struct.tPrivCar,
    %struct.tCarCtrl,
    %struct.tCarPitCmd,
    %struct.RobotItf*,
    %struct.CarElt*
}

%struct.tInitCar = type {
    [32 x i8],
    [32 x i8],
    [32 x i8],
    [32 x i8],
    i32,
    i32,
    i32,
    i32,
    [3 x float],
    %struct.t3Dd,
    %struct.t3Dd,
    %struct.t3Dd,
    float,
    float,
    %struct.t3Dd,
    [4 x %struct.tWheelSpec],
    %struct.tVisualAttributes
}

%struct.t3Dd = type {
    float,
    float,
    float
}

%struct.tWheelSpec = type {
    float,
    float,
    float,
    float,
    float
}

%struct.tVisualAttributes = type {
    i32,
    [2 x %struct.t3Dd],
    float
}

%struct.tPublicCar = type {
    %struct.tDynPt,
    %struct.tDynPt,
    [4 x [4 x float]],
    %struct.tTrkLocPos,
    i32,
    [4 x %struct.tPosd]
}

%struct.tDynPt = type {
    %struct.tPosd,
    %struct.tPosd,
    %struct.tPosd
}

%struct.tPosd = type {
    float,
    float,
    float,
    float,
    float,
    float
}

%struct.tTrkLocPos = type {
    %struct.trackSeg*,
    i32,
    float,
    float,
    float,
    float
}

%struct.trackSeg = type {
    i8*,
    i32,
    i32,
    i32,
    i32,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    %struct.t3Dd,
    [4 x %struct.t3Dd],
    [7 x float],
    float,
    float,
    float,
    %struct.t3Dd,
    i32,
    float,
    i32,
    float,
    %struct.SegExt*,
    %struct.trackSurface*,
    [2 x %struct.trackBarrier*],
    %struct.RoadCam*,
    %struct.trackSeg*,
    %struct.trackSeg*,
    %union.anon.0
}

%struct.SegExt = type {
    i32,
    i32*
}

%struct.trackSurface = type {
    %struct.trackSurface*,
    i8*,
    float,
    float,
    float,
    float,
    float,
    float
}

%struct.trackBarrier = type {
    i32,
    float,
    float,
    %struct.trackSurface*,
    %class.v2t
}

%class.v2t = type {
    %union.anon
}

%union.anon = type {
    %struct.anon
}

%struct.anon = type {
    float,
    float
}

%struct.RoadCam = type {
    i8*,
    %struct.t3Dd,
    %struct.RoadCam*
}

%union.anon.0 = type {
    %struct.anon.1
}

%struct.anon.1 = type {
    %struct.trackSeg*,
    %struct.trackSeg*
}

%struct.tCarRaceInfo = type {
    double,
    i8,
    double,
    double,
    double,
    double,
    float,
    float,
    i32,
    i32,
    i32,
    i32,
    double,
    i32,
    double,
    double,
    float,
    float,
    double,
    %struct.TrackOwnPit*,
    i32,
    %struct.CarPenaltyHead
}

%struct.TrackOwnPit = type {
    %struct.tTrkLocPos,
    i32,
    float,
    float,
    i32,
    [4 x %struct.CarElt*]
}

%struct.CarPenaltyHead = type {
    %struct.CarPenalty*,
    %struct.CarPenalty**
}

%struct.CarPenalty = type {
    i32,
    i32,
    %struct.anon.2
}

%struct.anon.2 = type {
    %struct.CarPenalty*,
    %struct.CarPenalty**
}

%struct.tPrivCar = type {
    i8*,
    i8*,
    i32,
    [32 x i8],
    [4 x %struct.tWheelState],
    [4 x %struct.tPosd],
    i32,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    [10 x float],
    i32,
    i32,
    [4 x float],
    [4 x float],
    i32,
    i32,
    float,
    %struct.t3Dd,
    %struct.t3Dd,
    i32,
    i32,
    %struct.tCollisionState_
}

%struct.tWheelState = type {
    %struct.tPosd,
    float,
    float,
    i32,
    %struct.trackSeg*,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    float,
    float
}

%struct.tCollisionState_ = type {
    i32,
    [3 x float],
    [3 x float]
}

%struct.tCarCtrl = type {
    float,
    float,
    float,
    float,
    i32,
    i32,
    [4 x [32 x i8]],
    [4 x float],
    i32
}

%struct.tCarPitCmd = type {
    float,
    i32,
    i32,
    %struct.tCarPitSetup
}

%struct.tCarPitSetup = type {
    %struct.tCarPitSetupValue,
    [4 x %struct.tCarPitSetupValue],
    [4 x %struct.tCarPitSetupValue],
    [4 x %struct.tCarPitSetupValue],
    %struct.tCarPitSetupValue,
    %struct.tCarPitSetupValue,
    [4 x %struct.tCarPitSetupValue],
    [4 x %struct.tCarPitSetupValue],
    [4 x %struct.tCarPitSetupValue],
    [4 x %struct.tCarPitSetupValue],
    [4 x %struct.tCarPitSetupValue],
    [4 x %struct.tCarPitSetupValue],
    [2 x %struct.tCarPitSetupValue],
    [2 x %struct.tCarPitSetupValue],
    [2 x %struct.tCarPitSetupValue],
    [2 x %struct.tCarPitSetupValue],
    [2 x %struct.tCarPitSetupValue],
    [8 x %struct.tCarPitSetupValue],
    [2 x %struct.tCarPitSetupValue],
    [3 x %struct.tCarPitSetupValue],
    [3 x %struct.tCarPitSetupValue],
    [3 x %struct.tCarPitSetupValue],
    [3 x %struct.tCarPitSetupValue],
    [3 x %struct.tCarPitSetupValue],
    [3 x %struct.tCarPitSetupValue],
    [3 x i32]
}

%struct.tCarPitSetupValue = type {
    float,
    float,
    float
}

%struct.RobotItf = type {
    void (i32, %struct.tTrack*, i8*, i8**, %struct.Situation*)*,
     {}*,
     {}*,
     {}*,
     i32 (i32, %struct.CarElt*, %struct.Situation*)*,
     void (i32)*,
     i32
}

%struct.tTrack = type {
    i8*,
    i8*,
    i8*,
    i8*,
    i8*,
    i8*,
    i32,
    i32,
    float,
    float,
    %struct.tTrackPitInfo,
    %struct.trackSeg*,
    %struct.trackSurface*,
    %struct.t3Dd,
    %struct.t3Dd,
    %struct.tTrackGraphicInfo
}

%struct.tTrackPitInfo = type {
    i32,
    i32,
    i32,
    i32,
    float,
    float,
    float,
    %struct.trackSeg*,
    %struct.trackSeg*,
    %struct.trackSeg*,
    %struct.trackSeg*,
    %struct.TrackOwnPit*,
    i32,
    i32
}

%struct.tTrackGraphicInfo = type {
    i8*,
    i8*,
    i32,
    [3 x float],
    i32,
    i8**,
    %struct.tTurnMarksInfo
}

%struct.tTurnMarksInfo = type {
    float,
    float,
    float,
    float
}

%struct.Situation = type {
    %struct.tRaceAdmInfo,
    double,
    double,
    i32,
    %struct.CarElt**
}

%struct.tRaceAdmInfo = type {
    i32,
    i32,
    i32,
    i32,
    i32,
    i64
}

define void @drive(i32 %index, %struct.CarElt* %car, %struct.Situation* %s) {

    %ctrl   = getelementptr %struct.CarElt* %car, i32 0, i32 5 
    %public_car = getelementptr %struct.CarElt* %car, i32 0, i32 2 
    %pos    = getelementptr %struct.tPublicCar* %public_car, i32 0, i32 3 
    %seg.addr = getelementptr %struct.tTrkLocPos* %pos, i32 0, i32 0 
    %seg    = load %struct.trackSeg** %seg.addr 

    %steer    = getelementptr %struct.tCarCtrl* %ctrl, i32 0, i32 0 
    %accelCmd = getelementptr %struct.tCarCtrl* %ctrl, i32 0, i32 1 
    %brakeCmd = getelementptr %struct.tCarCtrl* %ctrl, i32 0, i32 2 
    %clutchCmd  = getelementptr %struct.tCarCtrl* %ctrl, i32 0, i32 3 
    %gear   = getelementptr %struct.tCarCtrl* %ctrl, i32 0, i32 4 

%angle = alloca float 
 %nangle = alloca float 
 %posmid = alloca float 
 %width = alloca float 
 %corr = alloca float 
 %cangle = alloca float 
 %test = alloca float 
 %func = alloca float 
 %essai = alloca float 
 %zzzzz = alloca float 
 
%bonjour = alloca i32 
 %testd = alloca i32 
 %i = alloca i32 
 
%czerez = alloca [10 x i32]
 %rezte = alloca [5 x i32]

 
%ygfh = alloca [3 x float]
store i32 5, i32* %i
 
%r3 = load i32* %i
%r4 = load i32* %testd 
 %r5 = add i32 %r4, %r3
 store i32 %r5, i32* %testd
 
 
 %r8 = load i32* %i
 
 %r9 = mul i32 3, %r8
store i32 %r9, i32* %testd
 
%r12 = load i32* %i 
 %r11 = sub i32 %r12, 1
 store i32 %r11, i32* %i
 

 %r15 = call float @norm_pi_pi(float 5.11999988555908203e+00)
store float %r15, float* %angle
 
%r18 = load float* %posmid
 
 %r19 = load float* %width
 
 %r20 = fdiv float %r18, %r19
store float %r20, float* %corr
 
%r23 = load float* %nangle
 
 %r24 = load float* %corr
 
 %r25 = fsub float %r23, %r24
store float %r25, float* %cangle
 
%r28 = load float* %angle
 
  
 %r29 = fadd float %r28, 3.50000000000000000e+00
store float %r29, float* %test
 
 
  
 %r32 = mul i32 3, 2
 
  
 %r33 = add i32 %r32, 2
store i32 %r33, i32* %testd
 
%r35 = load i32* %testd
 
  
 %r36 = icmp sgt i32 %r35, 5
 
 br i1 %r36, label %ifvrai50, label %iffaux50 

 ifvrai50:%r38 = load float* %test
store float %r38, float* %essai
 
 br label %endif50 
 iffaux50:%r39 = load i32* %testd
 
  
 %r40 = icmp sle i32 %r39, 3
 
 br i1 %r40, label %ifvrai49, label %iffaux49 

 ifvrai49:%r42 = load float* %test
 
  
 %r43 = fsub float %r42, 5.09999990463256836e+00
store float %r43, float* %essai
 
 br label %endif49 
 iffaux49:%r45 = load i32* %testd 
 %r44 = add i32 %r45, 1
 store i32 %r44, i32* %testd
 
%r47 = load float* %nangle 
 %r46 = fadd float %r47, 1.000000e+00 
 store float %r46, float* %nangle
 
 br label %endif49 
 endif49: 
 
 br label %endif50 
 endif50: 
 
%r52 = load i32* %testd
 
  
 %r53 = icmp slt i32 %r52, 5
 
 br i1 %r53, label %ifvrai57, label %endif57 

 ifvrai57:%r55 = load i32* %testd 
 %r56 = add i32 %r55, 1
 store i32 %r56, i32* %testd
 
 br label %endif57 
  endif57: 

 
store i32 0, i32* %i
 
 br label %ifvrai68 
 ifvrai68: 
 %r65 = load i32* %i
%r66 = load i32* %testd 
 %r67 = add i32 %r66, %r65
 store i32 %r67, i32* %testd
 
 %r63 = load i32* %i 
 %r62 = add i32 %r63, 1
 store i32 %r62, i32* %i
 
 %r60 = load i32* %i
 
  
 %r61 = icmp slt i32 %r60, 5
 
 br i1 %r61, label %ifvrai68, label %iffaux68  
 iffaux68: 
 br label %endfor68 
 endfor68: 
 
br label %while74 
 while74: 
 %r73 = load i32* %i 
 %r72 = add i32 %r73, 1
 store i32 %r72, i32* %i
 
 %r70 = load i32* %i
 
  
 %r71 = icmp slt i32 %r70, 10
 
 br i1 %r71, label %while74, label %wend74 
 wend74:

 
%r77 = load float* %cangle
store float %r77, float* %steer
 
%r80 = load float* %cangle
store float %r80, float* %accelCmd
 
store i32 1, i32* %gear

store float 0.000000e+00, float* %clutchCmd
store float 0.000000e+00, float* %brakeCmd

 
    ret void 
}


define i32 @func_test ( i32 %testa , float %testb ) {

%testcx = alloca i32 
%r85 = load i32* %testcx

ret i32 %r85}


declare float @norm_pi_pi(float)
declare float @get_track_angle(%struct.tTrkLocPos*)
declare float @get_pos_to_right(%struct.tTrkLocPos*)
declare float @get_pos_to_middle(%struct.tTrkLocPos*)
declare float @get_pos_to_left(%struct.tTrkLocPos*)
declare float @get_pos_to_start(%struct.tTrkLocPos*)
declare float @get_track_seg_length(%struct.trackSeg*)
declare float @get_track_seg_width(%struct.trackSeg*)
declare float @get_track_seg_start_width(%struct.trackSeg*)
declare float @get_track_seg_end_width(%struct.trackSeg*)
declare float @get_track_seg_radius(%struct.trackSeg*)
declare float @get_track_seg_right_radius(%struct.trackSeg*)
declare float @get_track_seg_left_radius(%struct.trackSeg*)
declare float @get_track_seg_arc(%struct.trackSeg*)
declare %struct.trackSeg* @get_track_seg_next(%struct.trackSeg*)
declare float @get_car_yaw(%struct.CarElt*)
